package com.hs.app.helper;

public class SearcherObj {
  private String col_value = null;
  private String col_logical = "AND";
  private String col_selname = null;
  private String col_special = "=";
public String getCol_value() {
	return col_value;
}
public void setCol_value(String col_value) {
	this.col_value = col_value;
}
public String getCol_logical() {
	return col_logical;
}
public void setCol_logical(String col_logical) {
	this.col_logical = col_logical;
}
public String getCol_selname() {
	return col_selname;
}
public void setCol_selname(String col_selname) {
	this.col_selname = col_selname;
}
public String getCol_special() {
	return col_special;
}
public void setCol_special(String col_special) {
	this.col_special = col_special;
}
public String getSqlstr(){
	StringBuilder buileder = new StringBuilder(" ");
	buileder.append( col_selname );
	if("=".equals(col_special)){
		buileder.append( col_special ); 
		buileder.append( "'" );
		buileder.append( col_value.replaceAll("'", "''"));
		buileder.append( "' " );
	}else if("%".equals(col_special)){
		buileder.append( " like " ); 
		buileder.append( "'%" );
		buileder.append( col_value.replaceAll("'", "''"));
		buileder.append( "%' " );
	}
	return buileder.toString();
	
}
  
}
